| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Static Public Member Functions | List of all members
nkImages::ConversionUtils Class Referencefinal

Utility class offering helpers for conversions. More...

## Static Public Member Functions
static nkMaths::Vector | convertPixel (const nkMaths::Vector &pix, PIXEL_FORMAT inFormat, PIXEL_FORMAT outFormat)
static Image | convertImage (const ImageView &image, PIXEL_FORMAT outFormat, const AlignmentDescriptor &alignmentDescriptor=AlignmentDescriptor())

## Detailed Description

Utility class offering helpers for conversions.

## Member Function Documentation

## ◆ convertPixel()

static nkMaths::Vector nkImages::ConversionUtils::convertPixel | ( | const nkMaths::Vector & | pix,
|  | PIXEL_FORMAT | inFormat,
|  | PIXEL_FORMAT | outFormat
| ) |  |
| static

Converts a pixel from one format to another.

Parameters

  pix | The pixel to convert.
  inFormat | Provided pixel's format.
  outFormat | Which format to convert to.

Returns
  The converted pixel, expressed in its outFormat.

## ◆ convertImage()

static Image nkImages::ConversionUtils::convertImage | ( | const ImageView & | image,
|  | PIXEL_FORMAT | outFormat,
|  | const AlignmentDescriptor & | alignmentDescriptor = `AlignmentDescriptor()`
| ) |  |
| static

Converts a full image from one format to another.

Parameters

  image | The image to convert.
  outFormat | The format to convert to.
  alignmentDescriptor | The alignment constraint the output image should respect. Only the byte alignment fields are taken into account.

Returns
  A new image fitting the alignment constraints, in the format requested.

Remarks
  Currently, the conversion takes into account only the first mip and the first image in an array. It is also only supporting YUV to RGB typed format conversions.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsImages/Utils/ConversionUtils.h